package com.ccnf.core.bean;

/**
 * 响应请求返回的状态码
 */
public enum StatusCode {
    SUCCESS(1, "success"),
    NO_PERMISSION(403, "没有权限"),
    UNKNOWN_EXCEPTION(500, "未知异常"),
    RUNTIME_EXCEPTION(501, "运行时异常"),
    PARAMETER_ERROR(600, "错误参数格式"),
    ARGUMENT_TYPE_MISMATCH(601, "参数类型错误"),
    SQL_OPERATION_FAILURE(602, "数据操作失败"),
    BIZ_OPERATION_FAILURE(603, "业务流程操作不成功"),
    DATA_NOT_FOUNT(604, "没有找到数据");

    private int code;
    private String description;

    StatusCode(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}
